.class public final Lnet/tsapps/topdeals/a/h;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:Landroid/view/LayoutInflater;

.field private b:Ljava/util/List;

.field private c:Lnet/tsapps/topdeals/e/d;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;Lnet/tsapps/topdeals/e/d;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-object p2, p0, Lnet/tsapps/topdeals/a/h;->b:Ljava/util/List;

    iput-object p3, p0, Lnet/tsapps/topdeals/a/h;->c:Lnet/tsapps/topdeals/e/d;

    const-string v0, "layout_inflater"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    iput-object v0, p0, Lnet/tsapps/topdeals/a/h;->a:Landroid/view/LayoutInflater;

    return-void
.end method


# virtual methods
.method public final a(Lnet/tsapps/topdeals/e/d;)V
    .locals 0

    iput-object p1, p0, Lnet/tsapps/topdeals/a/h;->c:Lnet/tsapps/topdeals/e/d;

    invoke-virtual {p0}, Lnet/tsapps/topdeals/a/h;->notifyDataSetChanged()V

    return-void
.end method

.method public final getCount()I
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/h;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public final getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/h;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public final getItemId(I)J
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/a/h;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Dealer;

    iget-wide v0, v0, Lnet/tsapps/topdeals/objects/Dealer;->b:J

    return-wide v0
.end method

.method public final getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 5

    invoke-virtual {p0, p1}, Lnet/tsapps/topdeals/a/h;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Dealer;

    if-nez p2, :cond_0

    iget-object v1, p0, Lnet/tsapps/topdeals/a/h;->a:Landroid/view/LayoutInflater;

    const v2, 0x7f030012

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    :cond_0
    const v1, 0x7f050036

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iget-object v2, v0, Lnet/tsapps/topdeals/objects/Dealer;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const v1, 0x7f050037

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iget-object v2, p0, Lnet/tsapps/topdeals/a/h;->c:Lnet/tsapps/topdeals/e/d;

    iget-wide v3, v0, Lnet/tsapps/topdeals/objects/Dealer;->b:J

    invoke-virtual {v2, v3, v4}, Lnet/tsapps/topdeals/e/d;->a(J)Z

    move-result v0

    if-eqz v0, :cond_1

    const v0, 0x7f020037

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    :goto_0
    return-object p2

    :cond_1
    const v0, 0x7f020036

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_0
.end method
